package com.fkcai.hansoul.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fkcai.hansoul.model.entity.PostCommentReply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PostCommentReplyMapper extends BaseMapper<PostCommentReply> {
	/**
	 * 根据评论 id 查询评论回复
	 * @param commentId  评论 id
	 * @return  评论回复
	 */
	@Select("SELECT * FROM post_comment_reply WHERE comment_id = #{commentId} ORDER BY create_time ASC")
	List<PostCommentReply> selectByCommentId(@Param("commentId") Integer commentId);
}
